package com.jwsoft.manager.core.dao.model;

import com.baomidou.mybatisplus.annotation.*;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableLogic;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import java.util.Date;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

/**
 * 居住证历史表
 *
 * @author zhiyuan
 * @since 2023-09-13
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("eduh_live_place")
@Schema(name = "EduhLivePlace", title = "居住证历史表", description = "居住证历史表实体类")
public class EduhLivePlace extends Model<EduhLivePlace> {

    private static final long serialVersionUID = 1L;

    @Schema(name = "livePlaceId", description = "居住证id")
    @TableId(value = "live_place_id", type = IdType.ASSIGN_ID)
    private String livePlaceId;

    @Schema(name = "taskDetailId", description = "任务详情id")
    @TableField(value = "task_detail_id")
    private String taskDetailId;

    @Schema(name = "sfzh", description = "证件号码")
    @TableField(value = "sfzh")
    private String sfzh;

    @Schema(name = "xm", description = "姓名")
    @TableField(value = "xm")
    private String xm;

    @Schema(name = "mzdm", description = "民族代码")
    @TableField(value = "mzdm")
    private String mzdm;

    @Schema(name = "mz", description = "民族名称")
    @TableField(value = "mz")
    private String mz;

    @Schema(name = "xbdm", description = "性别代码")
    @TableField(value = "xbdm")
    private String xbdm;

    @Schema(name = "xb", description = "性别名称")
    @TableField(value = "xb")
    private String xb;

    @Schema(name = "czztdmlx", description = "持证主体代码类型")
    @TableField(value = "czztdmlx")
    private String czztdmlx;

    @Schema(name = "qzrq", description = "签注日期")
    @TableField(value = "qzrq")
    private String qzrq;

    @Schema(name = "qzdqrq", description = "签注到期日期")
    @TableField(value = "qzdqrq")
    private String qzdqrq;

    @Schema(name = "zjztdm", description = "证件状态代码")
    @TableField(value = "zjztdm")
    private String zjztdm;

    @Schema(name = "zjzt", description = "证件状态名称")
    @TableField(value = "zjzt")
    private String zjzt;

    @Schema(name = "zjnbbh", description = "居住证内部编号")
    @TableField(value = "zjnbbh")
    private String zjnbbh;

    @Schema(name = "xzqhdm", description = "所属区划编码")
    @TableField(value = "xzqhdm")
    private String xzqhdm;

    @Schema(name = "xzqhmc", description = "行政区划名称")
    @TableField(value = "xzqhmc")
    private String xzqhmc;

    @Schema(name = "jzdz", description = "居住地址")
    @TableField(value = "jzdz")
    private String jzdz;

    @Schema(name = "kpbh", description = "卡片编号")
    @TableField(value = "kpbh")
    private String kpbh;

    @Schema(name = "fzrq", description = "发证日期")
    @TableField(value = "fzrq")
    private String fzrq;

    @Schema(name = "zxrq", description = "注销日期")
    @TableField(value = "zxrq")
    private String zxrq;

    @Schema(name = "zxyydm", description = "注销原因代码")
    @TableField(value = "zxyydm")
    private String zxyydm;

    @Schema(name = "zxyy", description = "注销原因名称")
    @TableField(value = "zxyy")
    private String zxyy;

    @Schema(name = "hksxdm", description = "户口省县代码")
    @TableField(value = "hksxdm")
    private String hksxdm;

    @Schema(name = "hksx", description = "户口省县名称")
    @TableField(value = "hksx")
    private String hksx;

    @Schema(name = "hjdz", description = "户籍地址")
    @TableField(value = "hjdz")
    private String hjdz;

    @Schema(name = "fzjgTyxydm", description = "签发机关统一社会信用代码")
    @TableField(value = "fzjg_tyxydm")
    private String fzjgTyxydm;

    @Schema(name = "dscCity", description = "所属地市")
    @TableField(value = "dsc_city")
    private String dscCity;

    @Schema(name = "dscAdmRegion", description = "所属区/县")
    @TableField(value = "dsc_adm_region")
    private String dscAdmRegion;

    @Schema(name = "fzdgajg", description = "发证地公安机关名称")
    @TableField(value = "fzdgajg")
    private String fzdgajg;

    @Schema(name = "fzdgajgdm", description = "签发机关代码")
    @TableField(value = "fzdgajgdm")
    private String fzdgajgdm;

    @Schema(name = "dscSydepTblname", description = "数源单位表名")
    @TableField(value = "dsc_sydep_tblname")
    private String dscSydepTblname;

    @Schema(name = "dscDatasrTblname", description = "数据来源表名(清洗库或基础库 表名)")
    @TableField(value = "dsc_datasr_tblname")
    private String dscDatasrTblname;

    @Schema(name = "dscDwRksj", description = "地市仓数据入库时间")
    @TableField(value = "dsc_dw_rksj")
    private String dscDwRksj;

    @Schema(name = "dscHashUnique", description = "业务主键MD5值（清洗增加）")
    @TableField(value = "dsc_hash_unique")
    private String dscHashUnique;

    @Schema(name = "dscCleanTimestamp", description = "清洗时间（清洗增加）")
    @TableField(value = "dsc_clean_timestamp")
    private String dscCleanTimestamp;

    @Schema(name = "dscSydepName", description = "数源单位")
    @TableField(value = "dsc_sydep_name")
    private String dscSydepName;

    @Schema(name = "dscSydepSys", description = "数据所属系统名称")
    @TableField(value = "dsc_sydep_sys")
    private String dscSydepSys;

    @Schema(name = "dscSydepCode", description = "数源单位代码")
    @TableField(value = "dsc_sydep_code")
    private String dscSydepCode;

    @Schema(name = "dscBizOperation", description = "I 插入 U 更新 D 删除")
    @TableField(value = "dsc_biz_operation")
    private String dscBizOperation;

    @Schema(name = "year", description = "年份")
    @TableField(value = "year")
    private Integer year;

    @Schema(name = "del", title = "0,未删除,1,已删除")
    @TableField(value = "del", fill = FieldFill.INSERT, updateStrategy = FieldStrategy.NOT_NULL)
    @TableLogic
    private String del;

    @Schema(name = "createName", description = "创建人")
    @TableField(value = "create_name", fill = FieldFill.INSERT, updateStrategy = FieldStrategy.NOT_NULL)
    private String createName;

    @Schema(name = "createTime", description = "创建时间")
    @TableField(value = "create_time", fill = FieldFill.INSERT, updateStrategy = FieldStrategy.NOT_NULL)
    private Date createTime;

    @Schema(name = "updateName", description = "修改人")
    @TableField(value = "update_name", fill = FieldFill.INSERT_UPDATE, updateStrategy = FieldStrategy.NOT_NULL)
    private String updateName;

    @Schema(name = "updateTime", description = "更新时间")
    @TableField(value = "update_time", fill = FieldFill.INSERT_UPDATE, updateStrategy = FieldStrategy.NOT_NULL)
    private Date updateTime;

    @Schema(name = "areaCode", description = "行政区划")
    @TableField(value = "area_code")
    private String areaCode;

    @Schema(name = "materials", description = "佐证材料")
    @TableField(value = "materials")
    private String materials;

    @Schema(name = "sourceType", description = "数据来源：1 大数据获取 2管理员录入 3 学校录入")
    @TableField(value = "source_type")
    private String sourceType;

    @Schema(name = "encryptStatus", description = "加密状态 0待加密  1加密成功  2加密失败")
    @TableField(value = "encrypt_status")
    private String encryptStatus;

    @Schema(name = "encryptRemarks", description = "加密备注")
    @TableField(value = "encrypt_remarks")
    private String encryptRemarks;

    @Schema(name = "encryptTime", description = "加密时间")
    @TableField(value = "encrypt_time")
    private Date encryptTime;

    @Schema(name = "encryptFlag", description = "是否已加密  1是  0否")
    @TableField(value = "encrypt_flag")
    private String encryptFlag;

    @Schema(name = "cleanFlag", description = "是否销毁 1是 0 否")
    @TableField(value = "clean_flag")
    private String cleanFlag;
    @Override
    public Serializable pkVal() {
        return this.livePlaceId;
    }
}
